package com.pipayshop.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("user_withdrawal")
@Schema(description="用户提现表")
public class UserWithdrawal implements Serializable {

    private static final long serialVersionUID = 1L;

    @NotNull(message="[]不能为空")
    @ApiModelProperty("主键id")
    private Long id;

    @ApiModelProperty("用户id")
    @TableField("user_id")
    private Integer userId;

    @ApiModelProperty("用户名")
    @TableField("uid")
    private String uId;

    @ApiModelProperty("钱包地址")
    @TableField("wallet_address")
    private String walletAddress;

    @ApiModelProperty("提现金额")
    @TableField("cash_withdrawal_amount")
    private BigDecimal cashWithdrawalAmount;

    @ApiModelProperty("最终到手金额")
    @TableField("final_amount")
    private BigDecimal finalAmount;

    @ApiModelProperty("申请时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("time_of_application")
    private LocalDateTime timeOfApplication;

    @ApiModelProperty("完成时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("completion_time")
    private LocalDateTime completionTime;

    @ApiModelProperty("状态(0：申请中 1：已完成 2：已取消 3:拒绝)")
    @TableField("state")
    private Integer state;

    @ApiModelProperty("原因")
    @TableField("remark")
    private String remark;

    @ApiModelProperty("逻辑删除（0：未删1：软删 2：硬删）")
    @TableField("del_flag")
    private Integer delFlag;
}
